module ActionController
  class Base
    def process_with_ssl_asset_host(request, response)
      if !@@asset_host.blank?
	prefix = request.ssl?? 'https://' : 'http://'
	@@asset_host = prefix + @@asset_host.gsub(/^https?:\/\//,'')
      end
      process_without_ssl_asset_host(request, response)
    end
    alias_method_chain 'process', 'ssl_asset_host'
  end
end
